Skip to content

feat(pitot): truthful, reproducible Kimi controlled action + README - #136

Merged
bigboateng merged 8 commits into
mainfrom
worktree-pitot-kimi-controlled-action
Jul 23, 2026
Merged

feat(pitot): truthful, reproducible Kimi controlled action + README#136
bigboateng merged 8 commits into
mainfrom
worktree-pitot-kimi-controlled-action

Conversation

@bigboateng

Copy link
Copy Markdown
Contributor

What

Proves one truthful, locally reproducible Kimi control path and rewrites the Pitot README around that tested outcome.

Public promise: "Keep your coding agent. Add the behavior it is missing."

The tested path

clone → start one shell Controller → launch Kimi → allow one shell action → deny one shell action → prove the denied command never executed → prove the denial reason reached Kimi.

Changes

  • featshell-policy init template, pitot doctor --host HOST hook diagnostics, and truthful agent-launch guidance (pitot dev --host kimi -- kimi -p ...).
  • test — Two layers:
    • Test A (deterministic, no model): builds the generated shell-policy controller offline and drives canonical Kimi allow/deny payloads through the runtime — asserts exit 0/2, canary side effects, and that the deny reason reaches the caller. Plus init-contract, dev e2e (decision timeline, PITOT_RUNTIME, argv, unique runtime paths, --exec vs --), multi-language build, and doctor --host tests.
    • Test B (opt-in): env-gated (PITOT_KIMI_SMOKE) real-Kimi smoke that emits a bounded JSON evidence artifact (identities/hashes/decisions only — never raw commands).
  • docs — README rewrite: See-it-work-with-Kimi walkthrough grounded in the allow/deny canary, truthful one-time hook wiring, supported-hosts matrix keyed to what's verified in this repo. Removes the false "pitot dev configures the host for you" claim.
  • chore — Python SDK published as operatorstack-pitot (import stays pitot); public projection (UPSTREAM.json) synced.

Verification

  • gofmt clean, go vet ./... clean, go test ./cmd/pitot ok, go test -race ./cmd/pitot ok.
  • build_pitot.py --check PASS (114 files).
  • Rust/TS build tests skip cleanly when toolchains are absent; no network/registry access anywhere.

Not in scope

No global Kimi host config auto-edit; no browser UI; no additional SDK languages; no hosted/cloud runtime; no LLM policy generation; no marketplace; no general shell-security claims. Test B is unverifiable in CI (needs an authenticated kimi), by design.

Add a --template flag to `pitot init` (shell-policy, release-approval,
blank-controller, blank-consumer). The shell-policy template registers its
controller under the "shell" action kind so it actually governs Kimi's
PreToolUse/Bash boundary, and denies only the PITOT_DENY_ME canary (a sample
tripwire, not a shell-security control). Fix the next-step guidance to launch
the agent (pitot dev --host HOST -- AGENT), not the controller. Extend
`pitot doctor` with --host to check a host's binary, config, and hook wiring
without editing host config.
… pitot)

The bare "pitot" name is taken on PyPI; publish the distribution as
operatorstack-pitot while keeping the importable package "pitot".
…n Kimi smoke

Test A (deterministic, no model): build the generated shell-policy controller
offline and drive canonical Kimi allow/deny payloads through the runtime,
asserting exit 0/2, canary side effects, and that the deny reason reaches the
caller. Add init-contract, dev e2e (decision timeline, PITOT_RUNTIME, argv,
unique runtime paths, --exec vs -- semantics), multi-language build, and
doctor --host tests. Test B: env-gated real-Kimi smoke that emits a bounded
JSON evidence artifact. Add Kimi allow/deny conformance fixtures.
Lead with "Keep your coding agent. Add the behavior it is missing." and a
See-it-work-with-Kimi walkthrough grounded in the allow/deny canary the tests
exercise. Replace the false "pitot dev configures the host for you" claim with
truthful one-time hook wiring plus `pitot doctor --host HOST`, drop the
use-case gallery, and add a supported-hosts matrix keyed to what is verified in
this repo.
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Pitot coding-agent E2E

Intelligence Flow is the verification source; Pitot's public README carries the latest main status.

Agent Ubuntu macOS Windows Result Evidence
Claude ✅ Pass · real CLI 2.1.217 · native · binary-observed anthropic messages ✅ Pass · real CLI 2.1.217 · native · binary-observed anthropic messages ✅ Pass · real CLI 2.1.217 · native · binary-observed anthropic messages ✅ Passing All platforms are required
Cursor ✅ Pass · real CLI 2026.07.20-8cc9c0b · native · binary-observed cursor connect proto ✅ Pass · real CLI 2026.07.20-8cc9c0b · native · binary-observed cursor connect proto ✅ Pass · real CLI 2026.07.20-8cc9c0b · WSL · binary-observed cursor connect proto ✅ Passing All platforms are required
Codex ✅ Pass · real CLI 0.145.0 · native · binary-observed openai responses ✅ Pass · real CLI 0.145.0 · native · binary-observed openai responses ✅ Pass · real CLI 0.145.0 · native · binary-observed openai responses ✅ Passing All platforms are required
GitHub Copilot CLI ✅ Pass · real CLI 1.0.73 · native · binary-observed openai chat ✅ Pass · real CLI 1.0.73 · native · binary-observed openai chat ✅ Pass · real CLI 1.0.73 · native · binary-observed openai chat ✅ Passing All platforms are required
Gemini ✅ Pass · real CLI 0.51.0 · native · binary-observed gemini generate content ✅ Pass · real CLI 0.51.0 · native · binary-observed gemini generate content ✅ Pass · real CLI 0.51.0 · native · binary-observed gemini generate content ✅ Passing All platforms are required
Kimi Code ✅ Pass · real CLI 0.29.0 · native · binary-observed openai chat ✅ Pass · real CLI 0.29.0 · native · binary-observed openai chat ✅ Pass · real CLI 0.29.0 · native · binary-observed openai chat ✅ Passing All platforms are required
OpenCode ✅ Pass · real CLI 1.18.4 · native · binary-observed openai responses ❌ Failed ✅ Pass · real CLI 1.18.4 · native · binary-observed openai responses ❌ Failing All platforms are required
Pi ✅ Pass · real CLI 0.81.1 · native · binary-observed openai chat ✅ Pass · real CLI 0.81.1 · native · binary-observed openai chat ✅ Pass · real CLI 0.81.1 · native · binary-observed openai chat ✅ Passing All platforms are required
Qwen Code ✅ Pass · real CLI 0.20.1 · native · binary-observed openai chat ✅ Pass · real CLI 0.20.1 · native · binary-observed openai chat ✅ Pass · real CLI 0.20.1 · native · binary-observed openai chat ✅ Passing All platforms are required

Runtime capabilities

Capability Ubuntu macOS Windows Result
pitot request ✅ Pass · real runtime allow/deny ✅ Pass · real runtime allow/deny ✅ Pass · real runtime allow/deny ✅ Passing

Source commit: 280d7f3a4ed8

…e note

The generated Rust shell-policy controller uses serde_json::from_value but
the scaffolded Cargo.toml only declared pitot, so `cargo check` failed in CI
(where cargo is present; it was skipped locally). Declare serde_json = "1" to
match the SDK. Add the required append-only Pitot release note and re-sync the
public projection.
TestKimiShellPolicyAllowAndDeny drives the canary via `sh -c`/`printf` with
Unix path semantics; Git Bash on the Windows runner mangles the backslashed
temp paths, so the allow canary never lands at the expected path. Skip on
windows like the other POSIX shell-based tests; the control path is covered on
the Linux and macOS runners.
@bigboateng
bigboateng merged commit 29dd257 into main Jul 23, 2026
70 of 71 checks passed
@bigboateng
bigboateng deleted the worktree-pitot-kimi-controlled-action branch July 23, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant